package com.yonyougov.devops.cruxcisupport.versioninfo.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yonyougov.devops.fwc.api.dto.BaseRequestDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigInteger;
import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(value = "新增版本信息请求")
public class VersionInfoAddRequestDto extends BaseRequestDto {

    @NotNull
    @ApiModelProperty(required = true, name = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @NotEmpty
    @ApiModelProperty(required = true, name = "描述类型")
    private String type;

    @NotEmpty
    @ApiModelProperty(required = true, name = "版本描述")
    private String versionDesc;

    @NotNull
    @ApiModelProperty(required = true, name = "版本id")
    private BigInteger versionId;
}
